<?php

use think\facade\Route;

Route::rule('admin.login/save', 'admin.login/save');

Route::rule(':controller/:method', ':controller/:method');


if (\request()->method() === "OPTIONS")
{
    exit (
    json_encode([
        'error' => 200,
        'message' => 'option true.'
    ]));
} elseif (request()->method() === "HEAD")
{
    exit (json_encode(['error' => 200, 'message' => 'option true.']));
}